import request from "./request";

export default {
    getLogin(username, password) {
        return request({
            method: 'post',
            url: 'blogfbk/fbk/login',
            data: {
                username,
                password,
            }
        })
    },
    getLoginOut() {
        return request({
            method: 'post',
            url: 'blogfbk/index/logout'
        })
    },
    getUserInfo(){
        return request({
            method:'get',
            url:'blogfbk/fbk/index/logininfo',
        })
    },
    registerUser(username,password,checkpassword,email,phoneNumber,sex,introduce,avatar){
        return request({
            url:'blogfbk/fbk/index/register',
            method:'post',
            data:{
                username,
                password,
                checkpassword,
                email,
                phoneNumber,
                sex,
                introduce,
                avatar
            }
        })
    },
    byPasswordGetPassword(password,userId){
        return request({
            url:'blogfbk/fbk/index/getpassword',
            method:'get',
            params:{
                password,
                userId
            }
        })
    },
    updateMyselfInformation(userId,username,password,email,phoneNumber,sex,introduce){
        return request({
            url:'blogfbk/fbk/index/updateInformation',
            method:'post',
            data:{
                userId,
                username,
                password,
                email,
                phoneNumber,
                sex,
                introduce,
            }
        })
    },
    gologout(){
        return request({
            url:'blogfbk/index/logout',
            method:'get'
        })
    }
    
}